/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package locations.actions;

import locations.dao.implement.ProfesionalDAOHibernateJPA;
import locations.model.Profesional;

import com.opensymphony.xwork2.ActionSupport;

/**
 * 
 * @author nicolas
 */
public class EditProfesionalAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	private Profesional profesional;
	

	@Override
	public String execute() {
		ProfesionalDAOHibernateJPA dao = new ProfesionalDAOHibernateJPA();
		this.setProfesional(dao.retrieveById(Long.parseLong(this.getId())));
		return SUCCESS;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the profesional
	 */
	public Profesional getProfesional() {
		return profesional;
	}

	/**
	 * @param profesional
	 *            the profesional to set
	 */
	public void setProfesional(Profesional profesional) {
		this.profesional = profesional;
	}

}
